package com.lemner.ke.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lemner.ke.R;

import java.util.List;

public class SpinnerLeftAdapter extends BaseQuickAdapter<String,BaseViewHolder> {

    private int Lposition=0;
    public SpinnerLeftAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
    }
    public void setPostion(int position){
        this.Lposition=position;
    }
    @Override
    protected void convert(BaseViewHolder helper, String item) {
        helper.setText(R.id.tv_spinner_content,item);
        if (helper.getLayoutPosition()==Lposition){
            helper.setTextColor(R.id.tv_spinner_content,0xffd09c00);
        }else{
            helper.setTextColor(R.id.tv_spinner_content,0xff343434);
        }
    }
}
